#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <stdbool.h>

int compare(const void*a,const void*b)
{
	int*pa = (int*)a;
	int*pb = (int*)b;
	
	return *pa-*pb;
}
int main()
{
int arr1[3000] = {0};
int arr2[3000] = {0};
int t = 0;
int i = 0;
int n = 0;
int input = 0;
bool isJolly = true;

scanf("%d",&n);
while(i<n)
{
	scanf("%d",&input);
	arr1[i] = input;
	i++;
}
if(n==1)
{
	printf("Jolly");
}
else
{
	i = 0;
	while(i<n-1)
	{
		arr2[i] = abs(arr1[i]-arr1[i+1]);
		i++;
	}
	qsort(arr2,n-1,sizeof(arr2[0]),compare);
	i = 0;
	
	while(i<n-1)
	{
		if(arr2[i]!=i+1)
		{
			isJolly = false;
			break;
		}
		i++;
	}
}
if(isJolly)	
{
    printf("Jolly");
}
else
{
	printf("Not jolly");
}
 	
	return 0;
}
